<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>访问时间限制</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }

        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            text-align: center;
        }

        .error-container {
            background-color: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 40px;
            max-width: 600px;
            width: 100%;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
            animation: fadeIn 0.8s ease-out;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: #fff;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        p {
            font-size: 1.2rem;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .time-display {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
        }

        .time-box {
            background: rgba(255, 255, 255, 0.2);
            padding: 15px 25px;
            border-radius: 10px;
            font-size: 1.5rem;
            font-weight: bold;
            min-width: 120px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .time-label {
            font-size: 0.9rem;
            opacity: 0.8;
            margin-top: 5px;
        }

        .icon {
            font-size: 4rem;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        .contact {
            margin-top: 20px;
            font-size: 0.9rem;
            opacity: 0.8;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-20px); }
            60% { transform: translateY(-10px); }
        }

        @media (max-width: 600px) {
            .error-container {
                padding: 30px 20px;
            }

            h1 {
                font-size: 2rem;
            }

            .time-display {
                flex-direction: column;
                align-items: center;
                gap: 10px;
            }
        }
    </style>
</head>
<body>
<div class="error-container">
    <div class="icon">⏰</div>
    <h1>访问时间限制</h1>
    <p>抱歉，本网站只能在 <strong>06:00 - 23:00</strong> 之间进行访问。</p>

    <div class="time-display">
        <div>
            <div class="time-box" id="current-time">--:--</div>
            <div class="time-label">当前时间</div>
        </div>
        <div>
            <div class="time-box">06:00 - 23:00</div>
            <div class="time-label">允许访问时间</div>
        </div>
    </div>

    <p>请在此时间段内再次访问，感谢您的理解！</p>
    <div class="contact">如有紧急需求，请联系管理员</div>
</div>

<script>
    // 更新当前时间
    function updateCurrentTime() {
        const now = new Date();
        const hours = String(now.getHours()).padStart(2, '0');
        const minutes = String(now.getMinutes()).padStart(2, '0');
        document.getElementById('current-time').textContent = `${hours}:${minutes}`;
    }

    // 初始更新时间
    updateCurrentTime();

    // 每秒更新时间
    setInterval(updateCurrentTime, 1000);

    // 检查是否在允许的时间范围内（可选）
    function checkAccessTime() {
        const now = new Date();
        const currentHour = now.getHours();

        // 如果在6:00-23:00之间，可以重定向回首页
        if (currentHour >= 6 && currentHour < 23) {
            // window.location.href = 'index.html'; // 取消注释以启用自动重定向
        }
    }

    // 初始检查
    checkAccessTime();

    // 每分钟检查一次
    setInterval(checkAccessTime, 60000);
</script>
</body>
</html>